package com.portme.client;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.portme.shared.ClientCustomTab;
import com.portme.shared.ClientHomePage;
import com.portme.shared.ClientPost;
import com.portme.shared.LoginInfo;
import com.portme.shared.UserProfile;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
public interface GreetingServiceAsync {
	void greetServer(String input, AsyncCallback<String> callback)
			throws IllegalArgumentException;

	void getLoginUrl(AsyncCallback<LoginInfo> callback);

	void createTab(String tabTitle, AsyncCallback<ClientCustomTab> callback);

	void getUserPortfolio(String user, AsyncCallback<UserProfile> callback);

	void createPost(Long tabId, String title, String text,
			AsyncCallback<ClientPost> callback);
	
	void editPost(Long postId, String title, String text,
			AsyncCallback<ClientPost> callback);

	void setTheme(String themeName, AsyncCallback<String> callback);

	void setHomePage(String siteTitle, String pitchText, String about,
			String contact, AsyncCallback<ClientHomePage> callback);

	void addPostToHomePage(Long postId, AsyncCallback<ClientPost> callback);

	void deletePost(Long postId, AsyncCallback<Boolean> callback);

}
